// 封装所有频道的请求
import request from '@/utils/request.js'

// 获取所有频道列表
export const getAllChannels = () => {
  return request({
    method: 'GET',
    url: '/v1_0/channels'
  })
}
// 批量修改用户频道列表
export const addUserChannel = (obj) => {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: {
      channels: [obj]
    }
  })
}
// 删除频道
export const delUserChannel = target => {
  return request({
    method: 'DELETE',
    url: '/v1_0/user/channels/' + target
  })
}
